import GameManager from "./GameManager";
import UIManager from "./UIManager";

/**
 * 全局静态对象管理类
 * 管理挂载在节点上的单例脚本组件
 */
export default class StaticInstance {
  private static _uiManager: UIManager = null
  private static _gameManager: GameManager = null

  public static get uiManager(): UIManager {
    return this._uiManager
  }

  public static get gameManager(): GameManager {
    return this._gameManager
  }

  public static setUIManager(context: UIManager) {
    this._uiManager = context
  }

  public static setGameManager(context: GameManager) {
    this._gameManager = context
  }
}